
#CC = gcc
CC = /opt/uClinux/bfin-uclinux/bin/bfin-uclinux-gcc
CFLAGS=-Wall -O2
#CPPFLAGS=`/usr/local/apr/bin/apr-1-config --includes --cflags --cppflags`
CPPFLAGS=-I$(HOME)/bfin/apr-1.2.2/include -pthread -D_REENTRANT -D_GNU_SOURCE -Idd_cbfxs
#LDFLAGS=`/usr/local/apr/bin/apr-1-config --ldflags` -Wl,-elf2flt
LDFLAGS=-Wl,-elf2flt
#LDLIBS=`/usr/local/apr/bin/apr-1-config --link-ld --libs`
LDLIBS=$(HOME)/bfin/apr-1.2.2/libapr-1.la -lrt -lcrypt -lpthread -lm

all: verify_apr tdmoe

verify_apr:
	if ! test -f $(HOME)/bfin/apr-1.2.2/apr-1-config;then echo "instalar bfin_apr:\nwget http://acb08.googlecode.com/files/bfin_apr.tar.bz2; cd ~/bfin;tar xfj bfin_apr.tar.bz2";exit 1;fi

tdmoe: tdmoe.c

install: tdmoe
	ncftpput -u root -p uClinux 10.100.4.50 /tmp tdmoe
	cd dd;make install

clean:
	rm -f *.o tdmoe

